This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Sep 17, 2012, 9:00 PM
1 Posts

How to read CSV file

  • Category: Dojo and Client Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: read,csv file
  • Replies: 1
Hello Everyone:
 
I am trying to convert an existing application to xpages.  One thing that this application does is to open a file and reads from it line by line and creates documents based on the content of the csv file.  I had try using the notes help to find the equivalent of the lotus script methods and functions used for this process but I have not had any success.  I can not find the Javascript equivalent of open to open the file or the line input# to read line by line and also the equivalent of strleft or strright because that is how the code was done in lotusscript.  Since the file is comma separated values then a whole line is read and then the content is picked by selecting the values based on the position in the line.  I found some help but it is based on the web so the code is for agents and I am running this from a button in a form (it is an application for the notes client only).  Any help to direct me on where to find the equivalents or sample code that I can use will be greatly apreciated.
 
 
Thanks  
Sep 18, 2012, 8:57 AM
261 Posts
Re: How to read CSV file
Assuming you want to do the import server side (using SSJS), you might want to look for online samples that use Java to read CSV (instead of Javascript). I found a simple sample here.
 
The same question you had was also asked on Stackoverflow.
 
Mark 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal